package com.hyfrogx.modules.sys.form.config;

import com.hyfrogx.common.validator.group.AddGroup;
import com.hyfrogx.common.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 系统参数提交表单
 *
 * @author wanglei
 * @date 2019-06-05 19:06:34
 */
@Data
@ApiModel("系统参数提交表单")
public class ConfigSaveForm {

	@NotBlank(message = "参数名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
	@Length(max = 50, message = "参数名称不能超过{max}个字符", groups = {AddGroup.class, UpdateGroup.class})
	@ApiModelProperty("参数名称")
	private String paramKey;

	@NotBlank(message = "角色名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
	@Length(max = 2000, message = "角色名称不能超过{max}个字符", groups = {AddGroup.class, UpdateGroup.class})
	@ApiModelProperty("参数值")
	private String paramValue;

	@Length(max = 500, message = "角色名称不能超过{max}个字符", groups = {AddGroup.class, UpdateGroup.class})
	@ApiModelProperty("参数值说明")
	private String remark;
}
